﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Classes {
    import Classes.sim.*;
    import Classes.effects.*;
    import Classes.inventory.*;

    public class Peep extends NPC {

        public static const SOURCE_HOUSE:int = 0;
        public static const SOURCE_TOURBUS:int = 1;
        public static const SOURCE_CRUISESHIP:int = 2;

        public var isStraggler:Boolean = false;
        public var isTired:Boolean = false;
        public var isFranchiseFreebie:Boolean = false;
        public var spawnSource:int = 0;
        public var lastMerchantId:Number = 0;

        public function Peep(_arg1:String, _arg2:Boolean){
            super(_arg1, _arg2);
        }
        public function isReadyToGoHome():Boolean{
            return (((((!(this.isStraggler)) && ((Global.player.commodities.getCount(Commodities.GOODS_COMMODITY) == 0)))) || (this.isTired)));
        }
        public function beforeDecision():void{
            this.lastMerchantId = 0;
        }
        override protected function makeActionSelection():IActionSelection{
            return (new PeepActionSelection(this));
        }
        public function getBusinessEntranceEffects(_arg1:IMerchant):String{
            switch (this.spawnSource){
                case Peep.SOURCE_CRUISESHIP:
                    return (CoinPickEffect.COIN_SPIN_1_DOUBLE);
            };
            return (CoinPickEffect.COIN_SPIN_1);
        }

    }
}//package Classes 
